Skip to content

feat(export): Add client for /export endpoint#574

Open
bevzzz wants to merge 3 commits into
mainfrom
feat/export
Open

feat(export): Add client for /export endpoint#574
bevzzz wants to merge 3 commits into
mainfrom
feat/export

Conversation

@bevzzz

@bevzzz bevzzz commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Modeled after the export API in the Python client, client.export namespace exports methods to create, check status, and cancel a collection export. To the user working with export API should feel the same as working with the backups.

Bumped 1.37 version for integration tests to the latest patch, v1.37.7.

Bump 1.37 version to the latest v1.37.7
@bevzzz bevzzz self-assigned this Jun 6, 2026
@bevzzz bevzzz requested a review from a team as a code owner June 6, 2026 13:14

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

/** Path to export in the backend storage. */
@SerializedName("path") String path,
/** Export storage backend. */
@SerializedName("backend") String backend,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we type this? We have four backends and will not add new ones in the forseeable future

* due to a malformed request, a networking error
* or the server being unavailable.
*/
public Export create(String exportId, String backend) throws IOException {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have the backend as an Enum? There are only four valid values and those dont change often

* or the server being unavailable.
*/
public Export create(String exportId, String backend) throws IOException {
return create(new CreateExportRequest(CreateExportRequest.ExportCreate.of(exportId), backend));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also add the file format as a required parameter. There is currently only one, but there was strong interest in adding more

* due to a malformed request, a networking error
* or the server being unavailable.
*/
public Export create(CreateExportRequest request) throws IOException {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe its a Java thing but this overload seems to be a bit too much? :)

return "/export/" + cancel.backend + "/" + cancel.exportId;
},
request -> Collections.emptyMap())
.allowStatus(409);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

204 (accepted) is also ok

return excludeCollections(Arrays.asList(excludeCollections));
}

/** Collection that should be excluded from the backup. */

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments say backup in this file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants